package com.jxltech.unicam.utils;

import cn.hutool.core.io.FileUtil;
import com.google.common.collect.Lists;

import java.io.File;
import java.util.ArrayList;

/**
 * Created by feng on 2021/5/15 0015
 */
public class PhotoOrder {

	public static ArrayList<String> photoPaths = Lists.newArrayList(
			"E:\\unicam-ai\\纸箱分类程序\\纸箱分类\\纸箱数据集\\good");
	public static String toPath = "E:\\unicam-ai\\纸箱分类程序\\纸箱分类\\纸箱数据集\\good1";

	public static void order(){
		int k = 1;
		for (String photoPath : photoPaths) {
			File pDir = FileUtil.newFile(photoPath);
			for (File file : pDir.listFiles()) {
				String toFilePath = k++ + ".jpg";
				FileUtil.copy(file.getAbsolutePath(), toPath + File.separator + toFilePath, true);
			}
		}
	}
	public static void main(String[] args){
		order();
	}

}
